package com.china08.yxyapi.entity.mg.homework;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import javax.persistence.Id;

import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.china08.yxyapi.entity.mg.MongoBaseEntityNoId;

/**
 * 作业系统:作业:知识点:对应表, 每一个班任务 存储一条记录
 * 
 * @author Richard Wang
 *
 */
@Document(collection = "yxy.tea.homework.task.class")
public class HomeworkTaskClass extends MongoBaseEntityNoId {

	private static final long serialVersionUID = 114744923319700922L;

	/** 主键 */
	@Id
	private String id;

	/** 任务:ID */
	@Indexed
	@Field(value = "task_id")
	private String taskId;

	/** 标题 */
	@Field(value = "title")
	private String title;

	/**
	 * 试题类标题
	 */
	@Field(value = "sub_title")
	private String subTitle;

	/** 学校:ID */
	@Field(value = "school_id")
	private String schoolId;

	/** 班级:ID */
	@Field(value = "class_id")
	private String classId;

	/** 班级:名称 */
	@Field(value = "class_name")
	private String className;

	/** 年级 */
	@Field(value = "grade")
	private String grade;

	/** 学段 */
	@Field(value = "stage")
	private String stage;

	/** 学科 */
	@Field(value = "subject")
	private String subject;

	/** 学科名称 */
	@Field(value = "subject_name")
	private String subjectName;

	/**
	 * 本班级，参与此任务的人数。在发布作业时，赋值
	 */
	@Field(value = "num_of_student")
	private Integer numOfStudent = 0;

	/**
	 * 作业提交人数，在学生提交作业时进行更新
	 */
	@Field(value = "submit_of_student")
	private Integer submitOfStudent = 0;

	/**
	 * 已经批阅的人数，在教师批阅完时进行更新，批量统计
	 */
	@Field(value = "marking_of_student")
	private Integer markingOfStudent = 0;

	/** 发布时间 */
	@Field(value = "publish_date")
	private Date publishDate;
	/**
	 * 本任务截止完成时间，此时间之后就不能答题
	 */
	@Field(value = "predict_date")
	private Date predictDate;

	/** 发布用户 */
	@Indexed
	@Field(value = "publish_user_id")
	private String publishUserId;

	/** 发布用户名称 */
	@Field(value = "publish_user_nick")
	private String publishUserNick;

	/**
	 * 知识点正确率统计。 《知识点名称，正确率》
	 */
	@Field(value = "knows_rate")
	private Map<String, Double> knowsRate = new HashMap<String, Double>();

	/**
	 * 总结
	 */
	@Field(value = "summary")
	public String summary;
	/**
	 * 作业发布的来源 00--作业系统 01--备授课系统
	 */
	@Field(value = "source")
	private Integer source;

	/**
	 * 备授课类型: 0--预习作业 1--课后作业</br>
	 * 2017.08.25 王慧超 </br>
	 * 作业加预习作业和课后作业字段 </br>
	 * 预习作业：备授课发送的标记为预习作业的作业 </br>
	 * 课后作业：作业系统布置的以及备授课发送的标记为课后作业的作业
	 * 
	 */
	@Field(value = "lecture_type")
	private Integer lectureType;

	/**
	 * 备授课的id
	 */
	@Field(value = "lecture_id")
	private String lectureId;

	public Integer getSource() {
		return source;
	}

	public void setSource(Integer source) {
		this.source = source;
	}

	public Integer getLectureType() {
		return lectureType;
	}

	public void setLectureType(Integer lectureType) {
		this.lectureType = lectureType;
	}

	public String getLectureId() {
		return lectureId;
	}

	public void setLectureId(String lectureId) {
		this.lectureId = lectureId;
	}

    /**
     * 试题类型 0：试题类作业，1：通知类作业 2：阅读类作业。</br>
     * 2017.08.23 将2更改为"阅读类作业", 如果本次发布的作业为多类型的, 使用拼接的方式</br>
     * 例如: 012代表"试题,通知,阅读"; 02代表"试题,阅读"
     */
    @Field(value = "task_type")
    private String taskType;

	public String getGrade() {
		return grade;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}

	// get set
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public String getSchoolId() {
		return schoolId;
	}

	public void setSchoolId(String schoolId) {
		this.schoolId = schoolId;
	}

	public String getClassId() {
		return classId;
	}

	public void setClassId(String classId) {
		this.classId = classId;
	}

	public String getStage() {
		return stage;
	}

	public void setStage(String stage) {
		this.stage = stage;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getPublishUserId() {
		return publishUserId;
	}

	public void setPublishUserId(String publishUserId) {
		this.publishUserId = publishUserId;
	}

	public Integer getNumOfStudent() {
		return numOfStudent;
	}

	public void setNumOfStudent(Integer numOfStudent) {
		this.numOfStudent = numOfStudent;
	}

	public Integer getSubmitOfStudent() {
		return submitOfStudent;
	}

	public void setSubmitOfStudent(Integer submitOfStudent) {
		this.submitOfStudent = submitOfStudent;
	}

	public Integer getMarkingOfStudent() {
		return markingOfStudent;
	}

	public void setMarkingOfStudent(Integer markingOfStudent) {
		this.markingOfStudent = markingOfStudent;
	}

	public Date getPublishDate() {
		return publishDate;
	}

	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}

	public Date getPredictDate() {
		return predictDate;
	}

	public void setPredictDate(Date predictDate) {
		this.predictDate = predictDate;
	}

	public Map<String, Double> getKnowsRate() {
		return knowsRate;
	}

	public void setKnowsRate(Map<String, Double> knowsRate) {
		this.knowsRate = knowsRate;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getSubjectName() {
		return subjectName;
	}

	public void setSubjectName(String subjectName) {
		this.subjectName = subjectName;
	}

	public String getPublishUserNick() {
		return publishUserNick;
	}

	public void setPublishUserNick(String publishUserNick) {
		this.publishUserNick = publishUserNick;
	}

	public String getTaskType() {
		return taskType;
	}

	public void setTaskType(String taskType) {
		this.taskType = taskType;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getSubTitle() {
		return subTitle;
	}

	public void setSubTitle(String subTitle) {
		this.subTitle = subTitle;
	}

}
